﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Hired
{
    public partial class UCPostComment : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnPost_Click(object sender, EventArgs e)
        {
            Comment c = new Comment();
            c.Contents = txtPostComment.Text;
            c.PosterID = Parent.Page.User.Identity.Name;
            c.Timestamp = System.DateTime.Now;
            Thread t = DBThread.RetrieveThread(lblThreadID.Text);

            DBComment.AddComment(t, c);
        }
    }
}